// 常量路由
export const routeList = [
    {
        path: '/login',
        component: () => import('@/views/login/index.vue'),
        name: 'login',
        meta: {
            title: '登录',
            hidden: true,
            icon: '',
        },
    },
    {
        path: '/',
        component: () => import('@/views/layout/index.vue'),
        name: 'layout',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/home',
        children: [
            {
                path: '/home',
                component: () => import('@/views/home/index.vue'),
                name: 'home',
                meta: {
                    title: '首页',
                    hidden: false,
                    icon: 'HomeFilled',
                },
            },
        ]
    },
    {
        path: '/screen',
        component: () => import('@/views/screen/index.vue'),
        name: 'screen',
        meta: {
            title: '数据大屏',
            hidden: false,
            icon: 'Stopwatch',
        },
    },
    {
        path: '/404',
        component: () => import('@/views/404/index.vue'),
        name: '404',
        meta: {
            title: '404',
            hidden: true,
            icon: '',
        },
    },
];

// 异步路由
export const asyncRouteList = [
    {
        path: '/goods',
        component: () => import('@/views/layout/index.vue'),
        name: 'goods',
        meta: {
            title: '商品管理',
            hidden: false,
            icon: 'Goods',
        },
        children: [
            {
                path: '/goods/BrandManagement',
                component: () => import('@/views/goods/BrandManagement.vue'),
                name: 'BrandManagement',
                meta: {
                    title: '品牌管理',
                    hidden: false,
                    icon: 'User',
                },
            },
            {
                path: '/goods/ProManagement',
                component: () => import('@/views/goods/ProManagement.vue'),
                name: 'ProManagement',
                meta: {
                    title: '属性管理',
                    hidden: false,
                    icon: 'PriceTag',
                },
            },
            {
                path: '/goods/SkuManagement',
                component: () => import('@/views/goods/SkuManagement.vue'),
                name: 'SkuManagement',
                meta: {
                    title: 'SKU管理',
                    hidden: false,
                    icon: 'ShoppingCart',
                },
            },
            {
                path: '/goods/SpuManagement',
                component: () => import('@/views/goods/SpuManagement.vue'),
                name: 'SpuManagement',
                meta: {
                    title: 'SPU管理',
                    hidden: false,
                    icon: 'IceCream',
                },
            },
        ]
    },
    {
        path: '/rule',
        component: () => import('@/views/layout/index.vue'),
        name: 'rule',
        meta: {
            title: '权限管理',
            hidden: false,
            icon: 'Stamp',
        },
        children: [
            {
                path: '/rule/UserRule',
                component: () => import('@/views/rule/UserRule.vue'),
                name: 'UserRule',
                meta: {
                    title: '用户管理',
                    hidden: false,
                    icon: 'User',
                },
            },
            {
                path: '/rule/RoleRule',
                component: () => import('@/views/rule/RoleRule.vue'),
                name: 'RoleRule',
                meta: {
                    title: '角色管理',
                    hidden: false,
                    icon: 'Pointer',
                },
            },
            {
                path: '/rule/MenuRule',
                component: () => import('@/views/rule/MenuRule.vue'),
                name: 'MenuRule',
                meta: {
                    title: '菜单管理',
                    hidden: false,
                    icon: 'Menu',
                },
            },
        ]
    },

];

// 任一路由
export const eitherRouteList = [
    {
        path: '/:pathMath(.*)*',
        redirect: '404',
        name: 'any',
        meta: {
            title: '',
            hidden: true,
            icon: '',
        },
    },
];